/*
 * @Author: your name
 * @Date: 2021-12-30 09:56:09
 * @LastEditTime: 2022-01-28 14:07:38
 * @LastEditors: LAPTOP-L472H14P
 * @Description: In User Settings Edit
 * @FilePath: \react_front_engineer\src\component\home\index.js
 */
import React, { Component } from 'react'
import { Outlet } from 'react-router'
import axios from 'axios'
// import style from "./index.less"
import './index.css'
import { useNavigate, useLocation } from 'react-router'
const Detail = (props) => {
  //  console.log(props);
  const navigate = useNavigate()
  function toTheDertail(path) {
    navigate(`/${path}`, { state: { age: 30 } })
  }

  return (
    <div className="nav">
      <div onClick={() => toTheDertail('news')}>新闻</div>
      <div onClick={() => toTheDertail('yule')}>娱乐</div>
      <Outlet />
    </div>
  )
}
export default Detail
